package com.java.yz.day16;

//创建一个学生类

public class Student {
    public int age;
    String name;
    private boolean sex;

    public Student() {
    }

    public Student(int age) {
        this.age = age;
    }

    private Student(String name) {
        this.name = name;
    }

    private void fun1(){
        System.out.println("这是无参的私有方法");
    }
    private String fun1(String name){
        System.out.println("这是有参的私有方法");
        return name;
    }

    public void fun2(){
        System.out.println("这是无参的公共方法");
    }
    public Boolean fun2(Boolean sex){
        System.out.println("这是有参的公共方法");
        return sex;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                '}';
    }
}
